package com.stwyj.sbd.config.handler;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 *<p>
 * 统一ResponseBody返回值
 *</p>
 *
 * @author stwyj
 * @since 2018/11/30
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResponseResult {
    private Integer code;
    private String message;
    private Object data;

    public ResponseResult(Integer code, Object data) {
        this.code = code;
        this.data = data;
    }

    public ResponseResult(Object data) {
        this.code = 0;
        this.message = "SUCCESS";
        this.data = data;
    }
}
